{% extends "photologue/root.html" %}

{% load photologue_tags %}

{% block title %}{{ object.title }}{% endblock %}

{% block content %}

<h1>{{ object.title }}</h1>
<div class="gallery-photo">
    <a href="{{ object.image.url }}"><img src="{{ object.get_display_url }}" alt="{{ object.title }}"/></a>
    {% if object.caption %}<p>{{ object.caption }}</p>{% endif %}
</div>
{% if object.public_galleries %}
<h2>This photo is found in the following galleries:</h2>
<ol>
{% for gallery in object.public_galleries %}
    <li>{%previous_in_gallery object gallery%} <a href="{{ gallery.get_absolute_url }}">{{ gallery.title }}</a> {%next_in_gallery object gallery%}</li>
{% endfor %}
</ol>
{% endif %}

{% endblock %}
